import 'package:json_annotation/json_annotation.dart';

@JsonSerializable()
class DuZheLunModel{

  @JsonKey(name: 'status')
  String status;

  @JsonKey(name: 'datas')
  List<Datas> datas;

  @JsonKey(name: 'msg')
  String msg;

  @JsonKey(name: 'code')
  int code;

  DuZheLunModel(this.status,this.datas,this.msg,this.code,);

  factory DuZheLunModel.fromJson(Map<String, dynamic> json) {
    return DuZheLunModel(
        json['status'] as String,
        (json['datas'] as List)?.map((e) => e == null ? null : Datas.fromJson(e as Map<String, dynamic>))?.toList(),
        json['msg'] as String,
        json['code'] as int);
  }

}


@JsonSerializable()
class Datas{

  @JsonKey(name: 'html5')
  String html5;

  @JsonKey(name: 'thumbnail')
  String thumbnail;

  @JsonKey(name: 'id')
  String id;

  @JsonKey(name: 'pid')
  String pid;

  @JsonKey(name: 'uid')
  String uid;

  @JsonKey(name: 'post_id')
  String postId;

  @JsonKey(name: 'content')
  String content;

  @JsonKey(name: 'create_time')
  String createTime;

  @JsonKey(name: 'update_time')
  String updateTime;

  @JsonKey(name: 'status')
  String status;

  @JsonKey(name: 'ip')
  String ip;

  @JsonKey(name: 'good')
  String good;

  @JsonKey(name: 'model')
  String model;

  @JsonKey(name: 'to_author_name')
  String toAuthorName;

  @JsonKey(name: 'report')
  String report;

  @JsonKey(name: 'ignore')
  String ignore;

  @JsonKey(name: 'under_id')
  String underId;

  @JsonKey(name: 'card_id')
  String cardId;

  @JsonKey(name: 'hot')
  String hot;

  @JsonKey(name: 'nickname')
  String nickname;

  @JsonKey(name: 'avatar')
  String avatar;

  @JsonKey(name: 'title')
  String title;

  Datas(this.html5,this.thumbnail,this.id,this.pid,this.uid,this.postId,this.content,this.createTime,this.updateTime,this.status,this.ip,this.good,this.model,this.toAuthorName,this.report,this.ignore,this.underId,this.cardId,this.hot,this.nickname,this.avatar,this.title,);

  factory Datas.fromJson(Map<String, dynamic> json) {
    return Datas(
        json['html5'] as String,
        json['thumbnail'] as String,
        json['id'] as String,
        json['pid'] as String,
        json['uid'] as String,
        json['post_id'] as String,
        json['content'] as String,
        json['create_time'] as String,
        json['update_time'] as String,
        json['status'] as String,
        json['ip'] as String,
        json['good'] as String,
        json['model'] as String,
        json['to_author_name'] as String,
        json['report'] as String,
        json['ignore'] as String,
        json['under_id'] as String,
        json['card_id'] as String,
        json['hot'] as String,
        json['nickname'] as String,
        json['avatar'] as String,
        json['title'] as String);
  }

}


